package com.uyayo.system.config.service;

import com.uyayo.framework.common.exception.CodeMultipleException;
import com.uyayo.framework.common.exception.RecordNotExistException;
import com.uyayo.framework.pagehelper.pojo.PageBean;
import com.uyayo.system.config.dto.SysFileDTO;
import com.uyayo.system.config.entity.SysFile;
import com.uyayo.system.config.model.SysFileCondition;

import java.io.IOException;
import java.io.InputStream;

public interface SysFileService {
	
	SysFile getFilesById(long id);

	PageBean<SysFile> selectFileByPage(Integer page, Integer rows, String sort, String order, SysFileCondition sysFileCondition);

	SysFileDTO createFile(SysFile sysFile, String filePath, String fileName, InputStream inputStream) throws CodeMultipleException, IOException;

	boolean updateFile(SysFile sysFile,String filePath,String fileName, InputStream inputStream) throws CodeMultipleException, RecordNotExistException, IOException;

	boolean deleteFile(long fileId) throws RecordNotExistException;

	SysFile getFileByCode(String code);
}
